package development.hdk.mindmapfornandroid;

import android.content.Context;
import android.content.res.Resources;
import android.graphics.Color;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.AbsListView.LayoutParams;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import java.util.ArrayList;
import java.util.List;

public class ColorAdapter extends BaseAdapter
{
  int colorGridColumnWidth;
  private List<Integer> colorList = new ArrayList();
  private Context context;

  public ColorAdapter(Context paramContext)
  {
    this.context = paramContext;
    this.colorGridColumnWidth = Math.round(paramContext.getResources().getDimension(2131099648));
    String[] arrayOfString = paramContext.getResources().getStringArray(2131034112);
    this.colorList = new ArrayList();
    for (int i = 0; ; i++)
    {
      if (i >= arrayOfString.length)
        return;
      this.colorList.add(Integer.valueOf(Color.parseColor(arrayOfString[i])));
    }
  }

  public int getCount()
  {
    return this.colorList.size();
  }

  public Object getItem(int paramInt)
  {
    return null;
  }

  public long getItemId(int paramInt)
  {
    return 0L;
  }

  public View getView(int paramInt, View paramView, ViewGroup paramViewGroup)
  {
    ImageView localImageView = null;
    if (paramView == null)
    {
      localImageView = new ImageView(this.context);
      localImageView.setLayoutParams(new AbsListView.LayoutParams(this.colorGridColumnWidth, this.colorGridColumnWidth));
    }
    while (true)
    {
      localImageView.setFocusable(false);
      localImageView.setBackgroundColor(((Integer)this.colorList.get(paramInt)).intValue());
      localImageView.setId(paramInt);
      localImageView = (ImageView)paramView;
      return localImageView;
    }
  }
}

/* Location:           D:\APKtoJava_RC2\tools\classes-dex2jar.jar
 * Qualified Name:     com.qdvsoftworks.schematicmind.dialogs.ColorAdapter
 * JD-Core Version:    0.6.0
 */